<!DOCTYPE html>


<html xmlns:th="http://www.thymeleaf.org">

<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
<div>
    <h3>&nbsp</h3>
</div>
<div class="distance">
    <h3>项目列表</h3>
    <hr>
    <!--新增项目按钮-->
    <a th:href="@{/borrows/new}">新增借书</a>
    <br>
        <table>
            <thead>
            <tr>
                <tr>
                <th>借书人</th>
                <th>书籍状态</th>
                <th>描述</th>
                <th>动作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="aBorrow :${borrows}">
                <td th:text="${aBorrow.name}"></td>
                <td th:text="${aBorrow.stage}"></td>
                <td th:text="${aBorrow.description}"></td>
                <td>
                              <a
                            th:href="@{/borrows/delete(id=${aBorrow.borrowId})}"
                            class="btn btn-danger btn-sm"
                            onclick="if (!(confirm('你确定归还这本书吗'))) return false"
                    >归还</a>

                </td>
            </tr>
            </tbody>
        </table>
    </div>
</body>
</html>